/*
 * @Author: xinqiao lxq1990.0716@qq.com
 * @Date: 2023-12-27 17:51:33
 * @LastEditors: xinqiao lxq1990.0716@qq.com
 * @LastEditTime: 2023-12-27 17:55:45
 * @FilePath: \partal\src\utils\pinyin.ts
 * @Description: 拼音工具类
 */

import pinyin from 'js-pinyin'

/**
 * 中文转拼音首字母
 * @param ch 中文
 * @returns 
 */
export const getCamelChars = (ch: string) => {
  pinyin.setOptions({ checkPolyphone: false, charCase: 1 })
  return pinyin.getCamelChars(ch)
}
